{template 'admin','header'}
<form action="" method="POST" onsubmit="return r_submit(this);">
    <table cellpadding="2" cellspacing="1" class="table_form">
        <caption>修改用户</caption>
        <tr>
            <th width="20%"><font color="red">*</font><strong>用户名称</strong></th>
            <td>
                <input type="text" id="username" name="username" size="20" value="{$info['username']}"/>
            </td>
        </tr>
        <tr>
            <th width="20%"><font color="red">*</font><strong>原密码</strong></th>
            <td>
                <input type="password" id="old_password" name="old_password" size="20" value="" />
            </td>
        </tr>
        <tr>
            <th width="20%"><font color="red">*</font><strong>新密码</strong></th>
            <td>
                <input type="password" id="password" name="password" size="20" value=""/>
            </td>
        </tr>
        <tr>
            <th width="20%"><font color="red">*</font><strong>确认密码</strong></th>
            <td>
                <input type="password" id="password2" name="password2" size="20" value=""/>
            </td>
        </tr>
        <tr>
            <th width="20%"><font color="red">*</font><strong>真实姓名</strong></th>
            <td>
                <input type="text" id="truename" name="truename" size="20" value="{$info['truename']}"/>
            </td>
        </tr>
        <tr>
            <th width="20%"><font color="red">*</font><strong>所属组</strong></th>
            <td>
                {form::checkbox($group_list,"gid","gid",$info['groups'])}
            </td>
        </tr>
        <tr>
            <th width="20%"><font color="red">*</font><strong>用户类型</strong></th>
            <td>
                <select name="usertype" id="usertype">
                  <option value="">请选择</option>
                  {loop $usertype_list $key=>$value}
                    <option value="{$key}">{$value}</option>
                  {/loop}
                </select>
                 <script>
                    $("#usertype").val("{$info['usertype']}");
                 </script>
            </td>
        </tr>
        <tr>
            <th width="20%"><font color="red">*</font><strong>所属角色</strong></th>
            <td>
                {form::checkbox($role_list,"rid","rid",$info['roles'])}
            </td>
        </tr>
        <tr>
            <th width="20%"><strong>EMAIL</strong></th>
            <td>
                <input type="text" id="email" name="email" size="20" value="{$info['email']}"/>
            </td>
        </tr>
        <tr>
            <th width="20%"><strong>联系方式</strong></th>
            <td>
                <input type="text" id="contact" name="contact" size="20" value="{$info['contact']}"/>
            </td>
        </tr>
        <tr>
            <th width="20%"><strong>性别</strong></th>
            <td>
                <label styleClass="textCommon">女</label>
                <input type='radio' name='sex' value='0' />
                <label styleClass="textCommon">男</label>
                <input type='radio' name='sex' value='1' />
                <script>
                    $("input:radio[value={$info['sex']}]").attr("checked",'checked');
                </script>
            </td>
        </tr>
        <tr>
            <th><strong>用户描述</strong></th>
            <td>
                <textarea name="description" rows="2" cols="20" id="description" class="inputtext" style="height: 100px; width: 500px;">{$info['description']}</textarea>
            </td>
        </tr>
        <tr>
            <th></th>
            <td>
                <input type="submit" value=" 确定 " class="button_style">&nbsp;
                <input type="button" class="button_style" onclick="self.location='{urldecode($forward)}'" value=" 返回 ">
            </td>
        </tr>
    </table>
    <input type="hidden" name="userid" value="{$info['userid']}">
    <input type="hidden" name="forward" value="{$forward}">
</form>
{template 'admin','footer'}